<?php
/**
 * Created by IntelliJ IDEA.
 * User: xmiao
 * Date: 2018/12/11
 * Time: 12:00
 */

namespace app\magic\controller\admin;
use \think\Controller;

class Base extends Controller
{
    public function __construct()
    {
        session_start();
        parent::__construct();
        if(!session('uid')){
            echo '<script>location.href="/admin/login"</script>';
        }

        $this->assign('uname',session('uname'));
    }
}